package com.small.mybatis.mapping;

import com.small.mybatis.session.Configuration;
import com.small.mybatis.type.JdbcType;


/**
 * @Author zhoujin
 * @Date 2022/5/3 11:03
 */
public class ParameterMapping {

    private Configuration configuration;

    private String property;

    private Class<?> javaType = Object.class;

    private JdbcType jdbcType;

    public ParameterMapping() {
    }

    public static class Builder{

        private ParameterMapping parameterMapping = new ParameterMapping();


        public Builder(Configuration configuration, String property) {
            parameterMapping.configuration = configuration;
            parameterMapping.property = property;
        }

        public Builder javaType(Class<?> javaType) {
            parameterMapping.javaType = javaType;
            return this;
        }

        public Builder jdbcType(JdbcType jdbcType) {
            parameterMapping.jdbcType = jdbcType;
            return this;
        }
    }
}
